package com.cq.hd.product.api.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.cq.hd.common.serialize.Decimal2Serializer;
import com.fasterxml.jackson.annotation.JsonFormat;


import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
public class GoodsPageVo implements Serializable {

    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "商品标题")
    private String goodsName;

    @ApiModelProperty(value = "商品图片")
    private String goodsImgs;


    @ApiModelProperty(value = "商品售价")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal goodsPrice;


    @ApiModelProperty(value = "划线价格")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal originPrice;

    @ApiModelProperty(value = "总库存")
    private Integer totalStock;

    @ApiModelProperty(value = "剩余库存")
    private Integer remainStock;

    @ApiModelProperty(value = "冻结库存")
    private Integer freezeStock = 0;

    @ApiModelProperty(value = "销量")
    private Integer saleCount = 0;

    @ApiModelProperty(value = "使用说明/详情")
    private String details;

    @ApiModelProperty(value = "商品状态（1-待发布(草稿箱)，2-已下架(待发售)，3-已上架）")
    private Integer goodsState;

    @ApiModelProperty(value = "上架时间")
    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    private LocalDateTime upTime;

    @ApiModelProperty(value = "下架时间")
    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    private LocalDateTime offTime;

    @ApiModelProperty(value = "创建时间")
    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "核销方式（只对报名活动有效）：0-系统，1-票付通")
    private Integer verifyType;

    @ApiModelProperty(value = "票付通产品ID")
    private String pftProduct;

    @ApiModelProperty(value = "票付通门票ID")
    private String pftTicket;

    @ApiModelProperty(value = "票付通供应商ID")
    private String pftSupplier;

    @ApiModelProperty(value = "商户id")
    private Long merchantId;

    @ApiModelProperty(value = "商户名称(简称)")
    private String merchantShortName;

    @ApiModelProperty(value = "商家商户id")
    private Long businessMerchantId;

    @ApiModelProperty(value = "商家（策划人）名称")
    private String businessName;

}
